gpio set PL10
gpio set PG11
setenv machid 1029
setenv bootm_boot_mode sec
if ext4load mmc 0 0x00000000 /boot/.verbose
then
setenv verbosity 8
else
setenv verbosity 1
fi

setenv bootargs "console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 panic=10 consoleblank=0 enforcing=0 loglevel=${verbosity}"

usb start
setenv load_script_bin "ext4load mmc 0 0x43000000 /boot/script.bin || fatload mmc 0 0x43000000 script.bin || ext4load mmc 0 0x43000000 script.bin"
setenv load_kernel "ext4load mmc 0 0x48000000 /boot/uImage || fatload mmc 0 0x48000000 uImage || ext4load mmc 0 0x48000000 uImage"
setenv boot_kernel "bootm 0x48000000"
setenv bootcmd "usb start;run load_script_bin;run load_kernel; run boot_kernel"
saveenv
usb start
run load_script_bin
run load_kernel
run boot_kernel

# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr 
